<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css定位</title>
</head>
<body>
    <div class="fixed-box">
        固定定位
    </div>
    <div><img src="images/img.png" height="664" width="874"/></div>
    <div><img src="images/img.png" height="664" width="874"/></div>
    <div><img src="images/img.png" height="664" width="874"/></div>
</body>
<style type="text/css">
    .fixed-box {
        position: fixed;
        width: 150px;
        height: 150px;
        background-color: lightcoral;
        top: 20px; /* 相对于视口上移20px */
        right: 200px; /* 相对于视口右移20px */
    }
</style>
</html>
